export default [
  {
    url: /\/user\/login/, // 登录接口
    type: 'post',
    data: (params) => ({
      code: 200,
      data: {
        token:
          'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3NTA5MTE3MzQsImlhdCI6MTc1MDkwNDUzNCwidWlkIjoxLCJ1bm0iOiJhZG1pbiJ9.sgB8rRUyjR1VvbmfUKDuEY-UXkVlbyyfwTbiF9eDYMA',
        userId: 1,
        account: 'admin',
        nickname: '超级管理员',
        email: 'test@sina.com',
      },
      msg: '登录成功',
    }),
  },
  {
    url: /\/user\/logout/, // 退出接口
    type: 'get',
    data: () => ({
      code: 200,
      data: {},
      msg: '退出成功',
    }),
  },
  {
    url: /\/user\/captcha/, // 获取验证码接口
    type: 'get',
    data: () => ({
      code: 200,
      data: {
        captchaID: 'MoDQjvS9ZGzHfcq92NgC',
        captchaImage:
          '',
      },
      msg: '验证码获取成功',
    }),
  },
  {
    url: /\/user\/menu\/list/, // 获取用户菜单列表接口
    type: 'get',
    data: () => ({
      code: 200,
      data: {
        total: 1,
        menuList: [
          {
            path: '/',
            name: 'index',
            component: 'Layout',
            meta: {
              title: '/',
              icon: '',
              roleCode: 'sys',
            },
            children: [
              {
                path: '/dashboard',
                name: 'dashboard',
                component: 'RouterView',
                meta: {
                  title: '仪表盘',
                  icon: 'stopwatch',
                  roleCode: 'sys:dashboard',
                },
                children: [
                  {
                    path: '/dashboard/workplace',
                    name: 'dashboardWorkplace',
                    component: 'dashboard/Workplace.vue',
                    meta: {
                      title: '工作台',
                      icon: 'dataBoard',
                      roleCode: 'sys:dashboard:workplace',
                    },
                  },
                  {
                    path: '/dashboard/analysis',
                    name: 'dashboardAnalysis',
                    component: 'dashboard/Analysis.vue',
                    meta: {
                      title: '分析页',
                      icon: 'dataAnalysis',
                      roleCode: 'sys:dashboard:analysis',
                    },
                  },
                ],
              },
              {
                path: '/usermgr',
                name: 'usermgr',
                component: 'RouterView',
                meta: {
                  title: '用户管理',
                  icon: 'user',
                  roleCode: 'sys:usermgr',
                },
                children: [
                  {
                    path: '/usermgr/account',
                    name: 'usermgrAccount',
                    component: 'usermgr/User.vue',
                    meta: {
                      title: '账号',
                      icon: 'creditCard',
                      roleCode: 'sys:usermgr:account',
                    },
                    children: [
                      {
                        path: '',
                        name: '',
                        component: '',
                        meta: {
                          title: '新增',
                          icon: '',
                          roleCode: 'sys:usermgr:account:add',
                        },
                      },
                      {
                        path: '',
                        name: '',
                        component: '',
                        meta: {
                          title: '编辑',
                          icon: '',
                          roleCode: 'sys:usermgr:account:edit',
                        },
                      },
                      {
                        path: '',
                        name: '',
                        component: '',
                        meta: {
                          title: '删除',
                          icon: '',
                          roleCode: 'sys:usermgr:account:delete',
                        },
                      },
                    ],
                  },
                  {
                    path: '/usermgr/role',
                    name: 'usermgrRole',
                    component: 'usermgr/Role.vue',
                    meta: {
                      title: '角色',
                      icon: 'cherry',
                      roleCode: 'sys:usermgr:role',
                    },
                    children: [
                      {
                        path: '',
                        name: '',
                        component: '',
                        meta: {
                          title: '新增',
                          icon: '',
                          roleCode: 'sys:usermgr:role:add',
                        },
                      },
                      {
                        path: '',
                        name: '',
                        component: '',
                        meta: {
                          title: '编辑',
                          icon: '',
                          roleCode: 'sys:usermgr:role:edit',
                        },
                      },
                      {
                        path: '',
                        name: '',
                        component: '',
                        meta: {
                          title: '删除',
                          icon: '',
                          roleCode: 'sys:usermgr:role:delete',
                        },
                      },
                      {
                        path: '',
                        name: '',
                        component: '',
                        meta: {
                          title: '分配权限',
                          icon: '',
                          roleCode: 'sys:usermgr:role:permission',
                        },
                      },
                    ],
                  },
                  {
                    path: '/usermgr/permission',
                    name: 'usermgrPermission',
                    component: 'usermgr/Permission.vue',
                    meta: {
                      title: '权限',
                      icon: 'apple',
                      roleCode: 'sys:usermgr:permission',
                    },
                    children: [
                      {
                        path: '',
                        name: '',
                        component: '',
                        meta: {
                          title: '新增',
                          icon: '',
                          roleCode: 'sys:usermgr:permission:add',
                        },
                      },
                      {
                        path: '',
                        name: '',
                        component: '',
                        meta: {
                          title: '编辑',
                          icon: '',
                          roleCode: 'sys:usermgr:permission:edit',
                        },
                      },
                      {
                        path: '',
                        name: '',
                        component: '',
                        meta: {
                          title: '删除',
                          icon: '',
                          roleCode: 'sys:usermgr:permission:delete',
                        },
                      },
                    ],
                  },
                ],
              },
              {
                path: '/system',
                name: 'system',
                component: 'RouterView',
                meta: {
                  title: '系统管理',
                  icon: 'grid',
                  roleCode: 'sys:system',
                },
                children: [
                  {
                    path: '/system/profile',
                    name: 'systemProfile',
                    component: 'system/Profile.vue',
                    meta: {
                      title: '个人中心',
                      icon: 'postcard',
                      roleCode: 'sys:system:profile',
                    },
                  },
                  {
                    path: '/system/settings',
                    name: 'systemSettings',
                    component: 'system/Settings.vue',
                    meta: {
                      title: '系统设置',
                      icon: 'setting',
                      roleCode: 'sys:system:settings',
                    },
                  },
                  {
                    path: '/system/api',
                    name: 'systemApi',
                    component: 'system/Api.vue',
                    meta: {
                      title: 'API管理',
                      icon: 'magicStick',
                      roleCode: 'sys:system:api',
                    },
                  },
                ],
              },
              {
                path: '/devops',
                name: 'devops',
                component: 'RouterView',
                meta: {
                  title: 'DevOps',
                  icon: 'sugar',
                  roleCode: 'sys:devops',
                },
                children: [
                  {
                    path: '/devops/log',
                    name: 'devopsLog',
                    component: 'devops/Log.vue',
                    meta: {
                      title: '运行日志',
                      icon: 'document',
                      roleCode: 'sys:devops:log',
                    },
                  },
                  {
                    path: '/devops/vm',
                    name: 'devopsVm',
                    component: 'devops/Vm.vue',
                    meta: {
                      title: '服务器状态',
                      icon: 'monitor',
                      roleCode: 'sys:devops:vm',
                    },
                  },
                ],
              },
              {
                path: '/tools',
                name: 'tools',
                component: 'RouterView',
                meta: {
                  title: '小工具',
                  icon: 'star',
                  roleCode: 'sys:tools',
                },
                children: [
                  {
                    path: '/tools/matrix',
                    name: 'matrix',
                    component: 'tools/Matrix.vue',
                    meta: {
                      title: '像素图形',
                      icon: 'picture',
                      roleCode: 'sys:tools:matrix',
                    },
                  },
                ],
              },
            ],
          },
        ],
        authList: [
          'sys',
          'sys:dashboard',
          'sys:dashboard:analysis',
          'sys:dashboard:workplace',
          'sys:devops',
          'sys:devops:log',
          'sys:devops:vm',
          'sys:system',
          'sys:system:api',
          'sys:system:profile',
          'sys:system:settings',
          'sys:tools',
          'sys:tools:matrix',
          'sys:usermgr',
          'sys:usermgr:account',
          'sys:usermgr:account:add',
          'sys:usermgr:account:delete',
          'sys:usermgr:account:edit',
          'sys:usermgr:permission',
          'sys:usermgr:permission:add',
          'sys:usermgr:permission:delete',
          'sys:usermgr:permission:edit',
          'sys:usermgr:role',
          'sys:usermgr:role:add',
          'sys:usermgr:role:delete',
          'sys:usermgr:role:edit',
          'sys:usermgr:role:permission',
        ],
      },
      msg: '菜单列表获取成功',
    }),
  },
  {
    url: /\/user\/profile\/list/, // 获取用户信息列表接口
    type: 'get',
    data: () => ({
      code: 200,
      data: {
        account: 'admin',
        nickname: '超级管理员',
        phone: '18101907896',
        email: 'pu17rui@sina.com',
        gender: 0,
      },
      msg: '用户信息列表获取成功',
    }),
  },
  {
    url: /\/user\/profile\/update/, // 更新用户信息接口
    type: 'post',
    data: (params) => ({
      code: 200,
      data: params.data,
      msg: '用户信息更新成功',
    }),
  },
  {
    url: /\/user\/profile\/password\/update/, // 更新用户密码接口
    type: 'post',
    data: () => ({
      code: 200,
      data: {},
      msg: '密码更新成功',
    }),
  },
]
